# Maintainer: David Runge <dvzrv@archlinux.org>

_name=pysequoia
pkgname=python-pysequoia
pkgver=0.1.19
pkgrel=2
pkgdesc="Provides OpenPGP facilities in Python through the Sequoia PGP library"
arch=(loong64 x86_64)
url="https://codeberg.org/wiktor/pysequoia"
license=(Apache)
groups=(sequoia)
depends=(
  bzip2
  gcc-libs
  glibc
  gmp
  nettle
  openssl
  pcsclite
  python
)
makedepends=(
  clang
  python-build
  python-installer
  python-maturin
  python-wheel
)
source=($_name-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz)
sha512sums=('716e943e57273bd2fad8a01e2e5a4fe1c7c4f4a1150a9c69c215e3f022bf930d6b1922e23dcc914d17b50ebe6633fe20ef40a8cecc7ad6ea0765ea14421caa39')
b2sums=('5c0a947f86b1b01705f3069635e4fa2db77849e3ed79e326137815c423cca546c960bfc5b682a867fd40ef988600f9e18802fa2eeb386e7490bc4747aad4ddd8')

build() {
  cd $_name
  python -m build --wheel --no-isolation
}

package() {
  cd $_name
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -vDm 644 README.md -t "$pkgdir/usr/share/doc/$pkgnam/"
}
